<fieldset style="border:none;">
	<legend></legend>
	<input type="hidden" name="code.id" value="#(code.id??)" />
	<div >
		<div class="layui-form-item">
			<div class="layui-inline col-12 col-sm-24"> 
				<label class="layui-form-label col-6 col-sm-6">systemID</label>
				<div class="layui-input-inline col-18 col-sm-16">
					<input type="text" name="code.systemID" value="#(code.systemID??)" lay-verify="" autocomplete="off" placeholder="请输入systemID" class="layui-input">
				</div>
			</div>
			<div class="layui-inline col-12 col-sm-24">
				<label class="layui-form-label col-6 col-sm-6">代码类别</label>
				<div class="layui-input-inline col-18 col-sm-16">
					<select name="code.type" lay-filter="changeType">
						#@option(codeTypeList,"type","note",code.type??,false)
					</select>
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline col-12 col-sm-24"> 
				<label class="layui-form-label col-6 col-sm-6">代码值</label>
				<div class="layui-input-inline col-18 col-sm-16">
					<input type="text" name="code.dmz" value="#(code.dmz??)" lay-verify="" autocomplete="off" placeholder="请输入代码值" class="layui-input">
				</div>
			</div>
			<div class="layui-inline col-12 col-sm-24"> 
				<label class="layui-form-label col-6 col-sm-6">代码说明</label>
				<div class="layui-input-inline col-18 col-sm-16">
					<input type="text" name="code.dmsm" value="#(code.dmsm??)" lay-verify="" autocomplete="off" placeholder="请输入代码说明" class="layui-input">
				</div>
			</div>
		</div>
		
		<div class="layui-form-item">
			<div class="layui-inline col-12 col-sm-24"> 
				<label class="layui-form-label col-6 col-sm-6">代码说明2</label>
				<div class="layui-input-inline col-18 col-sm-16">
					<input type="text" name="code.dmsm2" value="#(code.dmsm2??)" lay-verify="" autocomplete="off" placeholder="请输入代码说明2" class="layui-input">
				</div>
			</div>
			<div class="layui-inline col-12 col-sm-24"> 
				<label class="layui-form-label col-6 col-sm-6">代码说明3</label>
				<div class="layui-input-inline col-18 col-sm-16">
					<input type="text" name="code.dmsm3" value="#(code.dmsm3??)" lay-verify="" autocomplete="off" placeholder="请输入代码说明3" class="layui-input">
				</div>
			</div>
		</div>
		<div class="layui-inline col-12 col-sm-24"> 
				<label class="layui-form-label col-6 col-sm-6">状态</label>
				<div class="layui-input-inline col-18 col-sm-16">
					<input type="hidden" id="state" name="code.state" value="#(code.state??1)">
				<input type="checkbox" #(code.state??"1"=="1" ? 'checked':'') lay-skin="switch" lay-filter="switchState" lay-text="启用|禁用">
				</div>
			</div>
		<div class="layui-form-item">
			<div style="text-align: center;">
				<button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
				<a href="xpCode" class="layui-btn layui-btn-primary">返回</a>
			</div>
		</div>
	</div>
	<script>
		
			layui.use(['form', 'laydate'], function(){
				var form = layui.form
				,layer = layui.layer;


				//自定义验证规则
// 				form.verify({
// 					userName: function(value){
// 						if(value.length < 5){
// 							return '用户名至少得5个字符啊';
// 						}
// 					},
// 				});

				//监听指定开关
// 				form.on('select(changebh)', function(data){
// 					if(data.value!="#(departmentID)")
// 					{
// 						$("#type").val("1");
// 						$("#type").attr("disabled","disabled");
// 						form.render('select'); //这个很重要
// 						$("#role").css("display","none");
// 						//form.render('checkbox');
// 					}
// 					else
// 					{
// 						$("#type").val("2");
// 						$("#type").removeAttr("disabled");
// 						form.render('select'); //这个很重要
// 						$("#role").css("display","block");
// 						form.render('checkbox');
// 					}
// 				});
				
				
				//监听指定开关
				form.on('switch(switchState)', function(data){
					$("#state").val(this.checked ? '1' : '0');
				});

				//监听提交
				form.on('submit(demo1)', function(data){
						//layer.alert(JSON.stringify(data.field), { title: '最终的提交信息' });
						//return false;
					//$("#type").removeAttr("disabled");
				});
			});
			
		$(function(){		
			#if(msg)
				xpsoft.msg('#(msg)');
			#end
		});			
		
	</script>
</fieldset>
